<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>背景位置</title>
    <style>
        body{
            /* 背景颜色 */
            background-color: #fff;
            /* 插入图片 */
            background-image: url(file/HTML/bg.jpg);
            /* 背景重复 */
            background-repeat: no-repeat;
            /* 背景位置 */
            background-position: center center;
            /* 背景滚动 */
            background-attachment: fixed;

            /* 复合写法 */
            background:#fff url(file/HTML/bg.jpg) no-repeat fixed center center;
        }
    </style>
</head>
<body>
    
</body>
</html>